home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_fallingdeath.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  79 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # PRU_fallingDeath.cog    Kills Indy if he falls too far.
  5. #
  6. # [GGJ]
  7. #
  8. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  9. #
  10. # ========================================================================================
  11. symbols
  12. message entered
  13. message    touched
  14. message    startup
  15.  
  16. thing    plate
  17. thing    block
  18.  
  19. surface    topSurf        
  20. surface    climbSurf0
  21. surface    climbSurf1
  22. surface    slideSurf
  23.  
  24. surface    floorSurf0    linkID=1
  25. surface    floorSurf1    linkID=1
  26. surface    floorSurf2    linkID=1
  27. surface    floorSurf3    linkID=1
  28. surface    floorSurf4    linkID=1
  29. surface    floorSurf5    linkID=1
  30. surface    floorSurf6    linkID=1
  31. surface    floorSurf7    linkID=1
  32. surface    floorSurf8    linkID=1
  33.  
  34. thing    stalagmite
  35.  
  36. int        deadly=0    local
  37.  
  38.  
  39. end
  40.  
  41. code
  42.  
  43. startup:
  44. Sleep(1.0);
  45. AttachThingToThing(plate, block);
  46. return;
  47.  
  48. entered:
  49. if (GetSenderRef() == topSurf)
  50. {
  51.     deadly = 1;
  52. }
  53.  
  54. if ((GetSenderRef() == climbSurf0) || (GetSenderRef() == climbSurf1) || (GetSenderRef() == slideSurf))
  55. {
  56.     deadly = 0;
  57. }
  58.  
  59. if ((GetSenderID() == 1) && (deadly == 1))
  60. {
  61.     DamageThing(GetLocalPlayerThing(), GetHealth(GetLocalPlayerThing()) + 1, 1, GetSenderRef());
  62.     Print("you die");
  63.     deadly = 0;
  64. }
  65. return;
  66.  
  67. touched:
  68. if ((GetSenderRef() == stalagmite) && (deadly == 1))
  69. {
  70.     DamageThing(GetLocalPlayerThing(), GetHealth(GetLocalPlayerThing()) + 1, 1, GetSenderRef());
  71.     Print("you die");
  72.     deadly = 0;
  73. }
  74. return;
  75.  
  76.  
  77. end
  78.  
  79.